<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||	
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws. 
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.). 
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations). 
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/classes/smarty/plugins/function.str_replace.php, $Author:  $ */


function smarty_function_str_replace($params, &$smarty)
{
	if ( empty($params['text']) )
	{
		return '';
	}

	$params['text'] = App::format(str_replace("`","",$params['text']));
	foreach($params as $items => $values)
	{
		if ( $items != 'text' )
		{
			$params['text'] = str_replace('{$'. str_replace("_",".",$items) .'}',$values,$params['text']);
		}
	}		

	return $params['text'];
}

?>